﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
 
namespace TPCN.DAL
{
   public class ChiTietHoaDonNhapObj
    {

        private string _ChitiethoadonnhapID;

        public string ChitiethoadonnhapID
        {
            get { return _ChitiethoadonnhapID; }
            set { _ChitiethoadonnhapID = value; }
        }
        private string _HoadonnhapID;

        public string HoadonnhapID
        {
            get { return _HoadonnhapID; }
            set { _HoadonnhapID = value; }
        }
        private string _HangID;

        public string HangID
        {
            get { return _HangID; }
            set { _HangID = value; }
        }
        private string _Soluong;

        public string Soluong
        {
            get { return _Soluong; }
            set { _Soluong = value; }
        }
        private string _Dongia;

        public string Dongia
        {
            get { return _Dongia; }
            set { _Dongia = value; }
        }
        public ChiTietHoaDonNhapObj SetValuesFromDataReader(IDataReader reader)
        {
            ChiTietHoaDonNhapObj obj = new ChiTietHoaDonNhapObj();
            obj.ChitiethoadonnhapID = (reader["ChitiethoadonnhapID"] is DBNull) ? String.Empty : reader["ChitiethoadonnhapID"].ToString();
            obj.HoadonnhapID = (reader["HoadonnhapID"] is DBNull) ? String.Empty : reader["HoadonnhapID"].ToString();
            obj.HangID = (reader["HangID"] is DBNull) ? String.Empty : reader["HangID"].ToString();
            obj.Soluong = (reader["Soluong"] is DBNull) ? "0" : reader["Soluong"].ToString();
            obj.Dongia = (reader["Dongia"] is DBNull) ? "0" : reader["Dongia"].ToString();
            return obj;
        }
    }
}
